<template>
  <el-form label-width="100px">
    <CommonProps :placeholder="false" :labelWidth="false" :field="false" />
    <el-form-item label="文字位置">
      <el-radio-group v-model="fs.getProps().align" size="small">
        <el-radio-button label="left">左对齐</el-radio-button>
        <el-radio-button label="center">居中</el-radio-button>
        <el-radio-button label="right">右对齐</el-radio-button>
      </el-radio-group>
    </el-form-item>
    <el-form-item label="上边距(px)">
      <el-input-number v-model="fs.getProps().marginTop" controls-position="right" />
    </el-form-item>
    <el-form-item label="右边距(px)">
      <el-input-number v-model="fs.getProps().marginRight" :min="0" controls-position="right" />
    </el-form-item>
    <el-form-item label="下边距(px)">
      <el-input-number v-model="fs.getProps().marginBottom" controls-position="right" />
    </el-form-item>
    <el-form-item label="左边距(px)">
      <el-input-number v-model="fs.getProps().marginLeft" :min="0" controls-position="right" />
    </el-form-item>
    <el-form-item label="字体大小(px)">
      <el-select v-model="fs.getProps().fontSize">
        <el-option value="12">12</el-option>
        <el-option value="14">14</el-option>
        <el-option value="16">16</el-option>
        <el-option value="18">18</el-option>
        <el-option value="20">20</el-option>
        <el-option value="22">22</el-option>
        <el-option value="24">24</el-option>
        <el-option value="26">26</el-option>
        <el-option value="28">28</el-option>
        <el-option value="30">30</el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="字体粗体">
      <el-switch v-model="fs.getProps().bold" />
    </el-form-item>
    <el-form-item label="字体斜体">
      <el-switch v-model="fs.getProps().italic" />
    </el-form-item>
  </el-form>
</template>

<script setup lang="ts">
import CommonProps from '../../common-props/Props.vue'
import {
  ElForm,
  ElFormItem,
  ElRadioButton,
  ElRadioGroup,
  ElSelect,
  ElOption,
  ElSwitch,
  ElInputNumber
} from 'element-plus'
import { useFlowStore } from '@/stores/flow'
const fs = useFlowStore()
</script>

<style lang="scss" scoped></style>
